﻿@model IEnumerable<LeadMaster.Models.CallCentres>
@using LeadMaster.Properties

<div class="spacer"></div>
@if (this.User.IsInRole(ApplicationRoles.Operations))
{
<p>
    @Html.ActionLink("Add Introducer", "Create")
</p>    
}
@if (Model.Count()==0)
{
    <label>Nobody entered in Orac yet.</label>
}
else
{
<table  class="listtable contactstable" cellspacing="0" cellpadding="0" style="width: 400px;">
<thead>
    <tr>
        @if (ViewBag.IsIntroducer == true)
        {
        <th>
        <label>IRef</label>
        </th>
        }
        <th>
            @Html.DisplayNameFor(model => model.Contact1)
        </th>
        <th>&nbsp;</th>
    </tr>
</thead>
@foreach (var item in Model)
{
    <tr>
        @if (ViewBag.IsIntroducer==true)
        {
            <td>
            <label>@item.CallCentreID.ToString()</label>
            </td>
        }
        <td>
            <label>
            @item.Contact1
            </label>
        </td>
        <td>
            @Html.ActionLink("Edit", "Edit", new { id = item.CallCentreID, personType = @ViewBag.PersonType }) |
            @Html.ActionLink("Delete", "Delete", new { id = item.CallCentreID })
        </td>
    </tr>
}
</table>
}